<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>首页</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="../../css/public.css" media="all" />
</head>
<body class="childrenBody">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<form class="layui-form" action="">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">房间等级</label>
            <div class="layui-input-inline">
                <select id="room">
                    <option value="1">体验</option>
                    <option value="2">初级</option>
                    <option value="3">中级</option>
                    <option value="4">高级</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">底分</label>
            <div class="layui-input-inline">
                <input type="text" name="points" id="points" lay-verify="required" placeholder="请输入房间底分" autocomplete="off" class="layui-input">
            </div>
            <!--<label class="layui-form-label">底分</label>-->
            <!--<div class="layui-input-inline">-->
            <!--<select id="points">-->
            <!--<option value="1">1/2</option>-->
            <!--<option value="2">2/4</option>-->
            <!--<option value="3">3/6</option>-->
            <!--<option value="4">4/8</option>-->
            <!--<option value="5">5/10</option>-->
            <!--</select>-->
            <!--</div>-->
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">最小带入</label>
            <div class="layui-input-inline">
                <input type="text" name="small" id="small" lay-verify="required" placeholder="请输入房间最小带入" autocomplete="off" class="layui-input">
            </div>
            <!--<label class="layui-form-label">最小带入</label>-->
            <!--<div class="layui-input-inline">-->
            <!--<select id="small">-->
            <!--<option value="10000">10000</option>-->
            <!--<option value="20000">20000</option>-->
            <!--<option value="30000">30000</option>-->
            <!--<option value="40000">40000</option>-->
            <!--</select>-->
            <!--</div>-->
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">玩法</label>
            <div class="layui-input-inline">
                <select id="founder">
                    <option value="1">明牌抢庄(1)</option>
                    <option value="2">明牌抢庄(2)</option>
                    <option value="3">明牌抢庄(3)</option>
                    <option value="4">明牌抢庄(4)</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">

        <div class="layui-inline">
            <label class="layui-form-label">人数</label>
            <div class="layui-input-inline" >
                <select id="personnum" name="personnum" lay-filter="personnum">
                    <option value="10">10人场</option>
                </select>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">机器人个数</label>

            <div class="layui-input-inline" >
                <select id="startnum" name="startnum" lay-filter="startnum">
                    <option value="10">10</option>
                    <option value="10">9</option>
                    <option value="10">8</option>
                    <option value="10">7</option>
                    <option value="10">6</option>
                    <option value="10">5</option>
                    <option value="10">4</option>
                    <option value="10">3</option>
                    <option value="10">2</option>
                </select>
            </div>
        </div>

    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">房间号码</label>
        <div class="layui-input-inline">
            <input type="text" name="roomnum" id="roomnum" lay-verify="required" placeholder="请输入房间号码" autocomplete="off" class="layui-input">
        </div>
        <div class="layui-inline" style="margin-left: 15px">
            <label class="layui-form-label">茶水费比例</label>
            <div class="layui-input-inline">
                <select id="tea">
                    <option value="1">20%</option>
                    <option value="2">30%</option>
                    <option value="3">40%</option>
                </select>
            </div>
        </div>


    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">闲家推注</label>
        <div class="layui-input-block">
            <select id="pushnote" lay-filter="aihao">
                <option value="5">5</option>
                <option value="10">10</option>
                <option value="15">15</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">翻倍规则</label>
        <div class="layui-input-block">
            <select id="double" lay-filter="aihao">
                <option value="0">牛牛x4 牛九x3 牛八x2</option>
                <option value="1">牛牛x4 牛九x3 牛八x2 牛七x2</option>
                <option value="2">【疯狂加倍】牛牛x10～牛一x1 无牛x1</option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">特殊牌型</label>
        <div class="layui-input-block">
            <input type="checkbox" name="special" title="顺子牛(5倍)" value="0">
            <input type="checkbox" name="special" title="同花牛(6倍)" value="1">
            <input type="checkbox" name="special" title="五花牛(5倍)" value="2">
            <input type="checkbox" name="special" title="葫芦牛(7倍)" value="3">
            <input type="checkbox" name="special" title="炸弹牛(8倍)" value="4">
            <input type="checkbox" name="special" title="五小牛(9倍)" value="5">
            <input type="checkbox" name="special" title="同花顺(10倍)" value="6">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">高级选项</label>
        <div class="layui-input-block">
            <input type="checkbox" name="high" title="中途禁入" value="0">
            <input type="checkbox" name="high" title="禁止搓牌" value="1">
            <input type="checkbox" name="high" title="闲家买码" value="2">
            <input type="checkbox" name="high" title="下注加倍" value="3">
            <input type="checkbox" name="high" title="下注限制" value="4">
            <input type="checkbox" name="high" title="暗抢庄家" value="5">
            <input type="checkbox" name="high" title="王牌癞子" value="6">
            <input type="checkbox" name="high" title="快速模式" value="7">
            <input type="checkbox" name="high" title="自动托管" value="8">
        </div>
    </div>
</form>

<script type="text/javascript" src="../../layui/layui.js"></script>
<script type="text/javascript" src="gameTea.js"></script>
<script src="../../js/cache.js"></script>
<script>
    // layui.use(['form','layer','layedit','laydate','upload'],function(){
    //     var form = layui.form;
    //     form.on('select(personnum)', function (data) {
    //         var nums = data.value;
    //         $("#startnum").empty();
    //         for (var i = 2;i<=nums;i++){
    //
    //             $('#startnum').append(new Option(i,i));
    //         }
    //         form.render('select');
    //     });
    //
    // })
    function ads(){
        var obj = document.getElementsByName("high");
        console.log(obj);
        var high = [];
        for (k in obj) {
            if (obj[k].checked)
                high.push(obj[k].value);
        }
        console.log(high);
        var obj = document.getElementsByName("special");

        var special= [];
        for (k in obj) {
            if (obj[k].checked)
                special.push(obj[k].value);
        }
        console.log(special);
        var double = $("#double").find("option:selected").val();
        var room = $("#room").find("option:selected").val();
        var founder = $("#founder").find("option:selected").val();
        var small = $("#small").val();
        var points = $("#points").val();
        var personnum = $("#personnum").find("option:selected").val();
        var tea = $("#tea").find("option:selected").val();
        var pushnote = $("#pushnote").find("option:selected").val();
        var startnum = $("#startnum").find("option:selected").val();
        var roomnum = $("#roomnum").val();
        if(startnum == null){
            layer.msg("请输入机器人个数!")
        }

        var marshal = '{"personnum" : '+personnum+' ,"points" :'+points+' ,"doubles" :'+double+' ,"maxz" :'+founder+' ,"room" :'+room+' ,"small" :'+small+
            ',"roomnum":'+roomnum+',"startnum":'+startnum+  ',"tea":'+tea+',"pushnote":'+pushnote+',"specialcard":"'+special.toString()+'" ,"hoptions":"'+high.toString()+'"}'
        return  marshal
    }
</script>
</body>
</html>